package homework1;

public class BaseballScore  implements IScore {
	
	public int runs1;
	public int runs2;
	public int totalInnings;
	
	public BaseballScore( int runs1, int runs2, int totalInnings ){
		this.runs1 = runs1;
		this.runs2 = runs2;
		this.totalInnings = totalInnings;
	}

	public String winner(String a, String b) {
		if( runs1 > runs2 )
			return a;
		return b;
	}

	public boolean isValid() {
		return totalInnings >= 9;
	}
	
}
